package com.whw.service;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.whw.entity.Student;
import com.whw.factory.StudentClientFallbackFactory;

@FeignClient(value="MICROSERVICE-SUDENT",fallbackFactory=StudentClientFallbackFactory.class)
public interface StudentClientService {
	
	@GetMapping("/student/get/{id}")
	public Student get(@PathVariable("id") Integer id);
	
	@GetMapping("/student/list")
	public List<Student>list();
	
	@PostMapping("/student/save")
	public boolean save(Student student);
	
	@GetMapping("/student/delete/{id}")
	public boolean delete(@PathVariable("id")Integer id);
	
	@GetMapping("/student/getInfo")
	public Map<String, Object>getInfo();
}
